<?php
//引入基础控制器
//include './Frame/Controller.class.php';
class newsController extends Controller{
    public function listAction(){
        
        //include 'Frame/Factory.class.php';
        $obj=Factory::M('newsModel');
        $news_list = $obj->getList();   
   
      //调用视图
        include CURRENT_VIEW_DIR.'news_v.html';
        }

    public function removeAction(){
        //删除4
        
        //include 'Frame/Factory.class.php';
        $obj=Factory::M('newsModel');

        $news_id=isset($_GET['news_id'])?$_GET['news_id']:'';
        if($news_id){
            $obj->newsremove($news_id);
            $news_list = $obj->getList(); //再次调用显示列表
          

        }
            //调用视图
        include CURRENT_VIEW_DIR.'news_v.html';
    }


}





















//调用模型类
//include './newsModel.class.php';
//$obj = new newsModel;
//$news_list = $obj->getList();